import store from '@/store'
export default {
  methods: {
    checkPermissionBtn(str) {
      if (store.state.user.userInfo.btnList) {
        // 登录了
        const btnList = store.state.user.userInfo.btnList
        if (btnList[0] === '*') {
          // 超级管理员
          return true
        } else {
          // 普通，就要判断
          console.log(btnList, str)
          return btnList.some((item) => item.mark === str)
        }
      } else {
        // 没有登录
        return false
      }
    }
  }
}
